<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        window.onload = function () {
            //点击事件：
            var btn = document.getElementById("btn");
            // btn.onclick = function (){
            //     alert("单击")
            // }

            btn.ondblclick = function () {
                alert("双击")
            }
        }

    </script>
</head>
<body>
<button id="btn" >点我</button>
</body>

</html>
